﻿using System;


namespace TopBuilds.Restaurant.Data
{
    public class Employee
    {
        #region 属性
        private int         _id;
        private int         _privilegeId;
        private int         _departmentId;
        private string      _name;
        private string      _password;
        private DateTime    _lastLoginTime;
        private int         _loginCount;
        #endregion

        #region 构造
        public Employee()
        {
            _privilegeId        = 0;
            _departmentId       = 0;
            _name               = null;
            _password           = null;
            _lastLoginTime      = DateTime.Now;
            _loginCount         = 0;
        }

        public Employee(int privilegeId)
        {
            _privilegeId       = privilegeId;
            _departmentId      = 0;
            _name              = null;
            _password          = null;
            _lastLoginTime     = DateTime.Now;
            _loginCount        = 0;
        }

        public Employee(int privilegeId, int departmentId)
        {
            _privilegeId       = privilegeId;
            _departmentId      = departmentId;
            _name              = null;
            _password          = null;
            _lastLoginTime     = DateTime.Now;
            _loginCount        = 0;
        }

        public Employee(int privilegeId, int departmentId,string name)
        {
            _privilegeId      = privilegeId;
            _departmentId     = departmentId;
            _name             = name;
            _password         = null;
            _lastLoginTime    = DateTime.Now;
            _loginCount       = 0;
        }

        public Employee(int privilegeId, int departmentId,string name, string password)
        {
            _privilegeId      = privilegeId;
            _departmentId     = departmentId;
            _name             = name;
            _password         = password;
            _lastLoginTime    = DateTime.Now;
            _loginCount       = 0;
        }

        public Employee(int privilegeId, int departmentId, string name, string password, DateTime lastLoginTime)
        {
            _privilegeId      = privilegeId;
            _departmentId     = departmentId;
            _name             = name;
            _password         = password;
            _lastLoginTime    = lastLoginTime;
            _loginCount       = 0;
        }

        public Employee(int privilegeId, int departmentId,string name, string password, DateTime lastLoginTime,int loginCount)
        {
            _privilegeId      = privilegeId;
            _departmentId     = departmentId;
            _name             = name;
            _password         = password;
            _lastLoginTime    = lastLoginTime;
            _loginCount       = loginCount;
        }
        #endregion

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public int PrivilegeId
        {
            get { return _privilegeId; }
            set{_privilegeId = value;}
        }

        public int DepartmentId
        {
            get { return _departmentId; }
            set { _departmentId = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }

        public DateTime LastLoginTime
        {
            get { return _lastLoginTime; }
            set { _lastLoginTime = value; }
        }

        public int LoginCount
        {
            get { return _loginCount; }
            set { _loginCount = value; }
        }
        public override string ToString()
        {
            return Name;
        }
    }
}
